package org.example.mapper;


import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import org.example.bean.Supplier;

import java.util.List;

public interface SupplierDao {
    public List<Supplier>list();
    @Delete("DELETE FROM supplier WHERE  id =#{id}")
    public Void del(int id);
    @Insert("INSERT INTO supplier(name,uname,tel,mail,text)VALUES(#{name},#{uname},#{tel},#{mail},#{text})")
    public void add(Supplier supplier);
    @Update("UPDATE supplier SET `name`=#{name},uname=#{uname},tel=#{tel},mail=#{mail},text=#{text} WHERE id=#{id}")
    public void update(Supplier supplier);
}
